<header>
    <div class="container-fluid statusbar navbar-fixed-top">
        <div class="row-fluid">
            <?php if (isset($nav)) { ?>
                <div class="span2"></div>
            <?php } else { ?>
                <div class="span2">
                    <a href="<?= site_url(''); ?>"><img src="<?= base_url(IMG . "logo_med.png") ?>"/></a>
                </div>
            <?php } ?>
            <div class="span3">
                <span class="color-rojo"><strong><?= $this->session->flashdata('mensaje') ?></strong></span>
            </div>
            <div class="span7">
                <div class="row-fluid">
                    <div class="span12">
                        <div class="statusbar-in">
                            <?php if ($this->session->userdata('logueado')) { ?>
                                <div class="alignright">
                                    <div class="btn-group">
                                        <a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><?= $this->session->userdata('usu_nick') ?>&nbsp;<span class="caret"></span></a>
                                        <ul class="dropdown-menu pull-right" style="padding: 0px">
                                            <li>
                                                <a href="<?= site_url('panel') ?>"><i class="icon-user"></i>&nbsp;<?= lang('perfil') ?></a>
                                            </li>
                                            <li>
                                                <a href="<?= site_url('panel/mensajes') ?>"><i class="icon-envelope"></i>&nbsp;<?= lang('mensajes') ?></a>
                                            </li>
                                            <li class="divider" style="width: 99%"></li>
                                            <li>
                                                <a href="<?= site_url('desconectar') ?>"><i class="icon-off"></i>&nbsp;<?= lang('desconectar') ?></a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                                <!--span class="font-size16" style="margin-left: 10px">
                                    3&nbsp;
                                    <a href="" data-placement="bottom" data-rel="tooltip" data-original-title="<?= lang('notificaciones') ?>">
                                        <img src="<?= base_url(IMG . 'home/notificacion.png') ?>"/>
                                    </a>
                                </span-->
                            <?php } else { ?>
                                <form class="form-inline marginbottom0 alignright" id="form_login" action="<?= site_url('usuario/login') ?>" method="post">
                                    <input type="hidden" name="url_return" value="<?=$this->uri->uri_string()?>"/>
                                    <input name="usu_nick" type="text" class="input-medlit padding0" placeholder="<?= lang('email'); ?>">
                                    <input name="usu_pass" type="password" class="input-medlit padding0" placeholder="<?= lang('password'); ?>">
                                    <button type="submit" class="btn btn-success">Acceder</button>
                                    <a href="#modal_registro" role="button" class="btn btn-info left" data-toggle="modal">Registro</a>
                                </form>
                            <?php } ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <?php if (isset($nav)) { ?>
        <?= $nav ?>
    <?php } ?>
</header>
<div id="modal_registro" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <form action="#" method="post" id="form_registro" name="comment-form">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h3 id="myModalLabel"><?=ulang('registrate')?></h3>
        </div>
        <div class="modal-body">
            <div class="row-fluid">
                <div class="span6">
                    <label><?= ulang('nombre_de_usuario') ?> <span>*</span></label>
                    <input id="usu_nick" name="usu_nick" type="text" placeholder="<?= ulang('tu') . " " . lang('nombre_de_usuario') ?>"/>
                </div>
                <div class="span6">
                    <label><?= ulang('email') ?> <span>*</span></label>
                    <input id="usu_email" name="usu_email" type="text" placeholder="<?= ulang('tu') . " " . lang('email') ?>" />
                </div>
            </div>
            <div class="row-fluid">
                <div class="span5">
                    <?= $this->captcha->render(ulang('demuestra_que_eres_humano')); ?>
                </div>
                <div class="span7">
                    <div class="alert alert-error hide" id="div_reg_errores_container">
                        <button type="button" class="close" data-dismiss="alert">&times;</button>
                        <div id="div_reg_errores"></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <button class="btn btn-large" data-dismiss="modal" aria-hidden="true"><?= ulang('cerrar') ?></button>
            <button class="btn btn-large btn-primary" type="submit"><?= ulang('registro') ?></button>
        </div>
    </form>
</div>